For example if I have this template:
if ($1) {
<#= selection #>$end
}
and I select a block of text like these lines and use abbrev:
// some code
// some code
// some code
the output will be this:
if () {
// some code
void// some code
void// some code
}
it's adding void keywords for some reason.
BTW if is selected just one line it works well.
Submitted | danielkurecka - 2011-12-04 - 20:44:51z | Assigned | nobody |
---|---|---|---|
Priority | 5 | Category | None |
Status | Open | Group | None |
Resolution | None | Visibility | No |
2012-07-04 - 14:36:46z danielkurecka |
Example above actually works, but the problem appears when before <#= selection #>
is newline and tab/space. Correct example (replace \t with actual tab character and try this template on multiline selection): if ($1) { \t<#= selection #>$end } I figure out that the problem is causing function "_indent" in ".jedit\SuperAbbrevs\template_generation_functions.bsh". Particularly the problem in this function is in the "indent" variable that returning "void". Workaround is to remove this variable, but than obviously abbrevs used on indented text will not be indented correctly. |
---|